-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: regression with updating read-only config #44039
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible to me, given that checkReadOnly()
is called again in writeData()
anyway.
Updated the commit message, I don't think the other failures are related to my change (maybe my fork was old though, so I've rebased). |
Any chance of getting this in for 29? |
/backport to stable29 |
/backport to stable28 |
/backport to stable27 |
Looks like something got stuck on the CI, so this still hasn't merged yet.. |
2ed85ea
to
e746156
Compare
I guess the cypress tests fail due to the parent branch living in a forked repository. |
Signed-off-by: Sam Bull <[email protected]>
Looks like my previous PRs were merged with these failing, so I'm guessing that making them required checks is probably not the right option while it doesn't work in forks. |
Revert some changes for #29901.
Old behaviour before those changes (and again, after this PR):
Nextcloud calls set('theme', '') etc. Because the existing config has the same values, it does not attempt to write anything to the config file. If the config file would get changed, then it gives an error if the read-only option is set.
Regression behaviour:
The same call is made and immediately errors despite the fact that the config file will not be changed.
The set()/delete() methods are clearly written in a way that they skip writing changes if the value is already the same, but the previous changes make a check before those checks, thus erroring when there are no changes to write. The same PR also adds this check to writeData(), which is called by both of these methods, making them redundant.